# -*- coding: utf-8 -*-

import csv

class CSVData:
    
    def __init__( self ):
        pass
    
    #http://pt.kioskea.net/faq/10376-python-ler-e-gravar-arquivos-csv
    def writeCSV( self, filename, data ):
        writer = csv.writer( open( '%s.csv' % ( filename ), 'a' ) )
        writer.writerows( data )
        pass

    def readCSV( self, csvName ):
        
        spamReader = csv.reader( open( csvName, 'rb' ), delimiter=',' )
        data = []
        
        for row in spamReader:
            data.append( row )
            pass
        
        return data
        pass